'use strict';

const HapiSwagger = require('hapi-swagger');
const Pack = require('../../package.json');

const swaggerOptions = {
    // auth: 'simple',
    info: {
        title: Pack.name,
        version: Pack.version,
        description: Pack.description,
        contact: {
            name: Pack.author,
            url: 'https://goingmerry.cn',
            email: 'makeup1123@163.com'
        }
    },
    debug: true,
    grouping: 'tags',
    tags: [
        { name: 'Config', description: '配置参数接口' },
        { name: 'Navigation', description: '导航菜单接口' },
        { name: 'Party/Member', description: '党员数据操作接口' },
        { name: 'Admin', description: '管理员数据操作接口' },
        { name: 'Auth-Admin', description: '管理员认证接口' },
        { name: 'Attachment/Image', description: '单图上传接口' },
        { name: 'Content/Category', description: '内容分类接口' },
        { name: 'Content/Content', description: '内容管理接口' },
        { name: 'Content/Tag', description: '内容标签接口' },
        { name: 'Content/Comment', description: '评论接口' },
        { name: 'Content/Page', description: '单页接口' }
    ],
    documentationPath: '/docs'
};
module.exports = {
    plugin: HapiSwagger,
    options: swaggerOptions
};
